<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>原型对象</title>
</head>
<body>
<script>
    function Flower(){

    }
    Flower.prototype.name="曼陀罗花";
    Flower.prototype.genera="茄科 曼陀罗属";
    Flower.prototype.area="印度、中国北部";
    Flower.prototype.uses="观赏或药用";
    Flower.prototype.showName=function() {
        alert(this.name);
    }
    /*var flower1=new Flower();
    flower1.showName();
    var flower2=new Flower();
    flower2.showName();
    alert(flower1.showName==flower2.showName);*/
    var flower1=new Flower();
    var flower2=new Flower();
    flower1.name="长春花";
    alert(flower1.name);
    alert(flower2.name);

</script>
</body>
</html>